1. Field of Invention
The present invention pertains to the field of software systems. More particularly, this invention relates to building a custom software environment including pre-loaded classes.
2. Art Background
Computer systems and devices having embedded processing resources typically conform to one of a variety of differing architectures. Each architecture is usually defined by a particular instruction set, hardware register set, and memory arrangement, etc. An architecture may also be referred to as a hardware platform for software execution. Software such as application programs which are written or compiled to be executed on a particular hardware platform may be referred to as native code. An application program in the native code of a particular hardware platform usually does not run on other non compatible hardware platforms.
Some prior software environments enable application programs to execute on a variety of differing hardware platforms. Typically, such a software environment provides a set of predefined services that enable an application program to interact with the hardware and operating system of a particular hardware platform. The predefined services are usually specified in terms of application programming interfaces (APIs) which an application program uses to invoke the predefined services. Such a software environment is commonly implemented in an object-oriented programming language in which the predefined services are implemented as predefined classes.
One example of such a software environment is a Java virtual machine. Typically, a Java virtual machine for a particular hardware platform is an implementation of a set of predefined Java classes in native code. In addition, a Java virtual machine usually supports a set of predefined additional classes which may be referred to as class libraries. These class libraries are usually stored in a file system. These class libraries may also be stored on network based file systems which are accessible using network access features of the particular hardware platform. Typically, a Java virtual machine includes a class loader that loads classes from the class libraries as needed when executing a Java application program.
A software environment such as Java is usually specified in a xe2x80x9cwell-definedxe2x80x9d software standard to which developers of virtual machines and application programs comply. Such a software standard usually specifies a set of APIs for the native classes which must be supported in an implementation of the software environment. Such a software standard also usually specifies a set of APIs for the class libraries which must be available in a local file system of the particular platform or network file system accessible by the particular platform.
Unfortunately, such well-defined software standards may limit the applicability of such a software environment. For example, such a software environment may have limited applicability to embedded systems which usually have limited resources in comparison to computer systems. Examples of embedded systems include telephones, audio and video equipment, home appliances, and computer peripherals.
For example, an embedded system may have little or no file system resources for storing the class libraries required by a well-defined standard. In addition an embedded system may have no network access or only sporadic or unreliable network access for loading class libraries required by a well-defined standard. Moreover, the costs of providing the file system and/or network access resources needed to support a well-defined standard may be prohibitively expensive for many embedded systems.
A system is disclosed for creating a custom environment for executing application programs in a target device. The system broadens the applicability of software environments like Java by providing custom pre-loaded classes for application programs and by customizing the procedures for class loading to the available resources in the target device. The system includes tools for generating a pre-load class list that specifies a set of classes needed to support the application program. The tools build the custom environment including a set of code for a virtual machine and a set of code for each of a set of pre-loaded classes specified in the pre-load class list. The virtual machine loads classes from the pre-loaded classes, a file system class library, and/or a networked class library using widely available network protocols.
Other features and advantages of the present invention will be apparent from the detailed description that follows.